import { defineStore } from 'pinia'
import { ref } from 'vue'

export const useComponentStore = defineStore(
  'componentStore',
  () => {
    const upSelected = ref<number>(0)
    const downSelected = ref<number>(0)

    function $reset() {
      upSelected.value = 0
      downSelected.value = 0
    }

    return { upSelected, downSelected, $reset }
  },
  {
    persist: {
      pick: ['upSelected', 'downSelected'],
    },
  }
)
